{include file='header.html'}
<ul class="nav nav-tabs">
	<li class="active"><a href="{$appadmin}?m=comment">{$lang.comment_admin}</a></li>
</ul>


<div class="rbox">
<table width="100%" border="0" class="table table-bordered">
  <tr>
    <td width="6%" height="24" align="center">ID</td>
    <td width="8%" align="center">{$lang.nickname}</td>
    <td width="8%" align="center">{$lang.status}</td>
    <td width="10%" align="center">{$lang.time}</td>
     
    <td width="47%" align="center">{$lang.content}</td>
    
    <td width="18%" align="center">{$lang.operation}</td>
  </tr>
  {foreach item=c from=$comment_list}
  <tr>
    <td align="center">{$c.id}</td>
    <td align="center">{$c.nickname}</td>
    <td align="center" class="status_text">{if $c.status eq 1}{$lang.unchecked}{elseif $c.status eq 2}{$lang.checked}{else}{$lang.forbidden}{/if}</td>
    <td align="center">{$c.dateline|date:Y-m-d}</td>
    
    <td align="left">{$c.content}<a href="{$c.referer}" target="_blank">查看</a></td>
    <td align="center"> 
    <a href="javascript:;" class="changestatus" url="{$appadmin}?m=comment&a=status&id={$c.id}&status=2" text='{$lang.checked}'>{$lang.pass}</a> 
    <a href="javascript:;" class="changestatus" url="{$appadmin}?m=comment&a=status&id={$c.id}&status=99" text='{$lang.forbidden}'>{$lang.forbid}</a> 
    <a href="javascript:;" class="del" url="{$appadmin}?m=comment&a=delete&id={$c.id}">{$lang.delete}</a></td>
  </tr>
  {/foreach}
  
</table>
{$pagelist}

</div>
<script language="javascript">
$(document).ready(function(){
	$(".changestatus").click(function(){
		obj=$(this);
		$.getJSON($(this).attr("url"),function(data){
			if(data.error=='0'){
				obj.parents("tr").children(".status_text").html(obj.attr("text"));
			}else{
				alert(data.message);
			}
		})
		
	});
	
});
</script>

{include file='footer.html'}